/**
 * 时间工具
 */
export default class TimeUtil {

    /** @param time 秒数*/
    public static TimeToMS(time: number): string {
        const minutes = Math.floor(time / 60);
        const seconds = Math.floor(time - (minutes * 60));
        let minutesStr = minutes.toString();
        let secondsStr = seconds.toString();
        if (minutes < 10) {
            minutesStr = "0" + minutes;
        }
        if (seconds < 10) {
            secondsStr = "0" + seconds;
        }
        return minutesStr + ":" + secondsStr;
    }

}
